<div id="content">
<?php
include("./PDO/PdoPays.php"); //On inclut les fonctions PDO (create / update etc...)
include("./class/Pays.php"); //On inclut les fonctions PDO (create / update etc...)

$pays = new PdoPays();
$pays = $pays->readAll();

include("./PDO/PdoCategorie.php"); //On inclut les fonctions PDO (create / update etc...)
include("./class/Categorie.php"); //On inclut les fonctions PDO (create / update etc...)

$categorie = new PdoCategorie();
$categorie = $categorie->readAll();
?>
<form id="validate_form" action="index.php?route=combattant&action=traitement_ajout" method="post">

    <label>Prénom</label>
    <input type="text" name="PRENOMCOMBATTANT" id="prenom" class="validate[required]"/><span id="mess_exist"></span>
    <label>Nom</label>
    <input type="text" name="NOMCOMBATTANT" id="nom" class="validate[required]"/><span id="mess_exist"></span>
    <label>Surnom</label>
    <input type="text" name="SURNOMCOMBATTANT" id="surnom" class="validate[required]"/><span id="mess_exist"></span>
    <label>Allonge(cm)</label>
    <input type="text" name="ALLONGECOMBATTANT" id="allonge" class="validate[required]"/><span id="mess_exist"></span>
    <label>Taille(cm)</label>
    <input type="text" name="TAILLECOMBATTANT" id="taille" class="validate[required]"/><span id="mess_exist"></span>
    <label>Categorie</label>
        <select name="IDCATEGORIE" size="1">
            <?php
            foreach ($categorie as $unecategorie) {
                echo '<option value="' . $unecategorie["IDCATEGORIE"] . '">' . $unecategorie["NOMCATEGORIE"] . '</option>';
            }
            ?>
        </select>  <br/>
    <label>Photo</label>
	<input type="text" name="PHOTOCOMBATTANT" id="photo" class="validate[required]"/><span id="mess_exist"></span>
    <label>Nationalité</label>
    <select name="IDPAYS" size="1">
        <?php
        foreach ($pays as $unpays) {
            echo '<option value="' . $unpays["IDPAYS"] . '">' . $unpays["NOMPAYS"] . " " . $unpays["NOMNATIONALITE"] . '</option>';
        }
        ?>
    </select>  <br/>
    <input type="submit" id="valider" />
</form>
</div>